projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83d6140
)
xm: allow non-existent readline module
author
Keir Fraser
<keir.fraser@citrix.com>
Tue, 18 Mar 2008 11:32:06 +0000
(11:32 +0000)
committer
Keir Fraser
<keir.fraser@citrix.com>
Tue, 18 Mar 2008 11:32:06 +0000
(11:32 +0000)
Let xm work even if Python doesn't have its readline module installed.
Signed-off-by: John Levon <john.levon@sun.com>
tools/python/xen/xm/main.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/xm/main.py
b/tools/python/xen/xm/main.py
index b4e7f1804b3b88a0068672e06e828304145d4d03..eab8e47c632a8693e633acd446408c6fb3ed6058 100644
(file)
--- a/
tools/python/xen/xm/main.py
+++ b/
tools/python/xen/xm/main.py
@@
-626,8
+626,11
@@
class Shell(cmd.Cmd):
def preloop(self):
cmd.Cmd.preloop(self)
- import readline
- readline.set_completer_delims(' ')
+ try:
+ import readline
+ readline.set_completer_delims(' ')
+ except ImportError:
+ pass
def default(self, line):
words = shlex.split(line)